﻿if exists (select * from sysobjects where name like N'%sp_DMKhachHang_Update%')
	drop proc sp_DMKhachHang_Update
go
create proc sp_DMKhachHang_Update
	@MaKhachHang varchar(50) = null,
	@TenKhachHang nvarchar(255) = null,
	@TenCongTy nvarchar(255) = null,
	@DiaChi nvarchar(255) = null,
	@DienThoai varchar(50) = null,
	@Fax varchar(50) = null,
	@Website varchar(50) = null,
	@TaiKhoan varchar(50) = null,
	@MaSoThue varchar(50) = null,
	@IsUse bit = null,
	@CreateBy int = null,
	@ModifiedBy int = null,
	@ModifiedOn datetime = null
as
begin
	update DMKhachHang
	set @TenKhachHang = TenKhachHang, 
		@TenCongTy = TenCongTy, 
		@DiaChi = DiaChi, 
		@DienThoai = DienThoai, 
		@Fax = Fax, 
		@Website = Website, 
		@TaiKhoan = TaiKhoan, 
		@MaSoThue = MaSoThue, 
		@IsUse = IsUse, 
		@ModifiedBy = ModifiedBy, 
		@ModifiedOn = ModifiedOn
	where MaKhachHang = @MaKhachHang
end